#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<ctype.h>
#define NAME_LEN 10

void startMessage(char *myname){
	char name[NAME_LEN];
	
		printf("hello,my name is %s,what's your name?\nmyname is:",myname);
		scanf("%s",name);

		printf("\n%s,how are you.\n",name);
		char message[20];
		scanf("%s",message);
		printf("%s,too \n",message);


}


int main( ){
	char * personA="LiLei";
	char *personB="Han meimei";
	char achar;
	printf("Are you boy[B] or girl[G]? input a char for sure:[B/G]\n");
	scanf("\n%c",&achar);
	if(isalpha(achar)){
		if(achar!='B'&&achar!='G'){
			printf("invalid input ,should be B or G ,expect:%c;\n",achar);
			return -1;
		}else{
		 	char *myname = achar=='B'?personA:personB;
			startMessage(myname);
				
		}
		
	}else{
		printf("invalid input\n");
		return -1;
	}


}

